﻿<classes:MSHPhoneApplicationPage 
    x:Class="WP7Client.UserInterface.Pages.MapPage"
    xmlns:classes="clr-namespace:WP7Client.Classes"
    xmlns:my="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" Loaded="MSHPhoneApplicationPage_Loaded"
    Name="theMapPage"
     xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit">
    
    <classes:MSHPhoneApplicationPage.Resources>
        <ControlTemplate x:Key="pushPinTemplate">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <Button Grid.Row="0" Name="buttonPin" Background="{Binding BackgroundColor}" Content="{Binding Content}" 
                    BorderThickness="0" Foreground="{Binding ForegroundColor}" 
                    Click="buttonPin_Click" FontSize="16" FontWeight="Normal" HorizontalAlignment="Left" Margin="-12,0,0,0"
                        />

                <Polygon Grid.Row="1" Fill="{Binding BackgroundColor}" HorizontalAlignment="Left" Margin="0,-15,0,0">
                    <Polygon.Points>
                        <Point X="0" Y="0" />
                        <Point X="0" Y="20"/>
                        <Point X="20" Y="0"/>
                    </Polygon.Points>
                
                </Polygon>

            </Grid>
        </ControlTemplate>
    </classes:MSHPhoneApplicationPage.Resources>
    

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <my:Map Grid.Row="0" Name="theMap" CopyrightVisibility="Collapsed" LogoVisibility="Collapsed" ZoomBarVisibility="Visible"/>

        <StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Bottom">
            <TextBlock Text="Map mode: " VerticalAlignment="Center"/>
            <ComboBox Name="ComboBoxModes" Width="100" Foreground="Black" SelectionChanged="ComboBoxModes_SelectionChanged" SelectedIndex="0">
                <ComboBox.Items>
                    <ComboBoxItem Name="ItemRoad" Content="Road"/>
                    <ComboBoxItem Name="ItemAerial" Content="Aerial"/>
                </ComboBox.Items>
            </ComboBox>
            <Button BorderThickness="0" Padding="-10" Click="Button_Click">
                <Image Source="/WP7Client;component/Resources/Images/ButtonRefresh.png" Height="40" />
            </Button>
        </StackPanel>
        
    </Grid>

</classes:MSHPhoneApplicationPage>
